]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
userMenu: Use the session id to detect the current session
authorAdel Gadllah <adel.gadllah@gmail.com>
Mon, 18 Feb 2013 17:03:13 +0000 (18:03 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Mon, 18 Feb 2013 19:13:38 +0000 (20:13 +0100)
This allows us to detect startx sessions.

https://bugzilla.gnome.org/show_bug.cgi?id=693896

js/ui/userMenu.js

index b12eee23710a3a6b1c5b5b92fc875c07bcacf903..ff38859a87c49775936a4567653ae8e23ae47307 100644 (file)
@@ -48,6 +48,7 @@ const IMStatus = {
 
 
 const SystemdLoginSessionIface = <interface name='org.freedesktop.login1.Session'>
+    <property name="Id" type="s" access="read"/>
     <property name="Remote" type="b" access="read"/>
     <property name="Class" type="s" access="read"/>
     <property name="Type" type="s" access="read"/>
@@ -960,8 +961,7 @@ const UserMenuButton = new Lang.Class({
                         if (proxy.Class != "user")
                             continue;
 
-                        if (userName == GLib.get_user_name() &&
-                            !proxy.Remote && proxy.Type == "x11")
+                        if (proxy.Id == GLib.getenv('XDG_SESSION_ID'))
                             continue;
 
                         sessions.push({ user: this._userManager.get_user(userName),